package com.gcgt.server;

import javax.jdo.PersistenceManager;

import lt.vin.currency.server.dao.CurrencyDao;
import lt.vin.currency.server.dao.impl.CurrencyDaoImpl;

import com.google.appengine.api.xmpp.XMPPService;
import com.google.appengine.api.xmpp.XMPPServiceFactory;
import com.google.inject.servlet.ServletModule;

class LolServletModule extends ServletModule {
	@Override
	protected void configureServlets() {
		bind(CurrencyDao.class).to(CurrencyDaoImpl.class);
		
		bind(PersistenceManager.class).toInstance(PMF.get().getPersistenceManager());
		bind(XMPPService.class).toInstance(XMPPServiceFactory.getXMPPService());	
		
		serve("/lol_lol_lol/greet").with(GreetingServiceImpl.class);
		serve("/com.gcgt.Finance/greet").with(GreetingServiceImpl.class);
		serve("/com.gcgt.Currency/greet").with(GreetingServiceImpl.class);
	}
}